package com.client_swt;


import java.awt.event.WindowEvent;

import org.eclipse.jface.window.ApplicationWindow;
import org.eclipse.swt.SWT;
import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.widgets.Button;
import org.eclipse.swt.widgets.Combo;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Label;
import org.eclipse.swt.widgets.Layout;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.swt.widgets.TabFolder;
import org.eclipse.swt.widgets.TabItem;
import org.eclipse.swt.widgets.Text;
import org.eclipse.swt.*;

public class BaseWindow extends ApplicationWindow {

	public BaseWindow(Shell shell) {
		super(shell);
		// TODO Auto-generated constructor stub
	}


	public Label createLabel(Composite composite, String text, Object layoutData) {
		Label label = new Label(composite, SWT.None);
		label.setText(text);
		label.setLayoutData(layoutData);
		return label;
	}


	public Text createText(Composite composite, Object layoutData, int style) {
		Text text = new Text(composite, style);
		text.setLayoutData(layoutData);
		return text;
	}


	public Composite createComposite(Composite parent, Layout layout) {
		Composite composite = new Composite(parent, SWT.None);
		composite.setLayout(layout);
		return composite;
	}


	public Composite createTabItem(TabFolder tabFolder, TabItem tabItem,
			Composite composite, String text) {
		tabItem = new TabItem(tabFolder, SWT.None);
		tabItem.setText(text);
		composite = new Composite(tabFolder, SWT.None);
		tabItem.setControl(composite);
		return composite;
	}


	public Combo createCombo(Composite composite, String[] items, int style) {
		Combo combo = new Combo(composite, style);
		combo.setItems(items);
		return combo;
	}


	public Button createButton(Composite composite, String text, int style,
			GridData gridData) {
		Button button = new Button(composite, style);
		button.setText(text);
		button.setLayoutData(gridData);
		return button;
	}


	public void processWindowEvent(WindowEvent e) {
		// TODO Auto-generated method stub
		
	}

}
